package si.unimb.engine;

import java.awt.Toolkit;
import si.unimb.client.Client;

public class Player {
	
	private int id;
	private String name;
	private int score;
	private boolean alive;
	private ClenKace clen;
	
	public Player(Client c, String name, int id, int x, int y){
		setId(id);
		setName(name);
		setScore(0);
		setAlive(true);
		if(c.getId() == id)
			setClen(new ClenKace (c, this, x, y, 4, 4, 800, 700, Toolkit.getDefaultToolkit().createImage(getClass().getResource("clen_kace_testni.jpg")), 38, 40, 37, 39));
		else
			setClen(new ClenKace (c, this, x, y, 4, 4, 800, 700, Toolkit.getDefaultToolkit().createImage(getClass().getResource("clen_kace_testni.jpg"))));
	}
	
//	public Player(String name, int lives, boolean alive, ClenKace clen){
//		setName(name);
//		setScore(0);
//		setAlive(true);
//		setClen(clen);	
//	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public int getScore() {
		return score;
	}
	
	public void addScore(int score) {
		this.score += score;
	}
	
	public void setScore(int score) {
		this.score = score;
	}

	public void setAlive(boolean alive) {
		this.alive = alive;
	}

	public boolean isAlive() {
		return alive;
	}

	public void setClen(ClenKace clen) {
		this.clen = clen;
	}

	public ClenKace getClen() {
		return clen;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getId() {
		return id;
	}

	
	

}
